﻿<UserControl x:Class="Zen4SyncDashboard.View.CreateTestScenarioView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Background="{DynamicResource ApplicationBackgroundBrush}">
    <DockPanel LastChildFill="True">
        <Label DockPanel.Dock="Top" Style="{DynamicResource ViewTitle}" Content="Create Test Scenario"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="3*"/>
                <ColumnDefinition Width="7*"/>
            </Grid.ColumnDefinitions>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="3*"/>
                    <ColumnDefinition Width="7*"/>
                </Grid.ColumnDefinitions>
                <Label Content="Name"/>
                <Label Content="Activity Type" Grid.Row="2"/>
                <Label Content="Activity" Grid.Row="3"/>
                <Label Content="Pre Wait" Grid.Row="4"/>
                <Label Content="Post Wait" Grid.Row="5"/>
                <TextBox Grid.Column="1" Style="{StaticResource NewTextBoxStyle}" Text="{Binding Path=NewTestScenario.testScenario_name, ValidatesOnDataErrors=True}"/>
                <ComboBox Grid.Column="1" Grid.Row="2" Style="{StaticResource NewComboBoxStyle}" x:Name="ActivityTypesComboBox" ItemsSource="{Binding Path=ActivityTypes}" DisplayMemberPath="activityType_name" SelectedItem="{Binding Path=CurrentActivity.activityType, ValidatesOnDataErrors=True}"/>
                <ComboBox Grid.Column="1" Grid.Row="3" Style="{StaticResource NewComboBoxStyle}" ItemsSource="{Binding Path=SelectedItem.AvailableActivities, ElementName=ActivityTypesComboBox}" SelectedItem="{Binding Path=CurrentActivity.activity_activityItemId, ValidatesOnDataErrors=True}"/>
                <TextBox Grid.Row="4" Grid.Column="1" Style="{StaticResource NewTextBoxStyle}" Text="{Binding Path=CurrentActivity.activity_preWaitingTimeInSeconds, ValidatesOnDataErrors=True}"/>
                <TextBox Grid.Row="5" Grid.Column="1" Style="{StaticResource NewTextBoxStyle}" Text="{Binding Path=CurrentActivity.activity_postWaitingTimeInSeconds, ValidatesOnDataErrors=True}"/>
                <Button Content="Add" Grid.Row="6" Grid.Column="1" Command="{Binding AddCurrentActivityCommand}"/>
                <Button Content="Create" Grid.Row="8" Grid.ColumnSpan="3" Command="{Binding AddNewTestScenarioCommand}"/>
            </Grid>
            <ListBox Grid.Column="1" ItemsSource="{Binding Path=NewTestScenario.activities}" DisplayMemberPath="activity_activityItemId"/>
        </Grid>
    </DockPanel>
</UserControl>
